<template>
	<view class="">
		<navbar title='官方客服' :back="true" color="#fff" leftIconColor="#fff"></navbar>
		<u-popup  height="100%" :show="isshow" mode='center' round='20' :zIdx='0' :zIndex='0' :safeAreaInsetBottom='false'>
			<view style="width:400rpx;padding: 126rpx 60rpx 30rpx 60rpx;position: relative;">
				<view style='position: absolute;top: -100rpx;left: 32%;'>
					<image src="https://cdn.yowswl.com/image/admin/2023/11/16/f0eddc5d91114e428eb64bf13c7f115bgk5ljxicp6.png" mode="widthFix" style="width: 200rpx;"></image>
				</view>
				<view style="text-align: center;">
					<image src="https://cdn.yowswl.com/image/admin/2023/11/16/bc52799783504b84b7495a432eb903d09qwsyqfw65.png" mode="widthFix" style="width: 240rpx;display: inline-block;"></image>
				</view>
				<view style="font-size: 22rpx;color: #adadad;text-align: center;margin: 10rpx 0;">长按保存二维码</view>
				<image :show-menu-by-longpress="true" :src="img" mode="widthFix" style="width: 100%;"
					@longtap="previewImage"></image>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import {
		getConfig,
		getGroupValue
	} from "@/api/public.js"
	import navbar from "@/components/baseNavbar.vue"
	export default {
		components: {
			navbar
		},
		data() {
			return {
				img: '',
				isshow: false,
			}
		},
		onLoad() {
			getConfig('customer_qrcode_image').then(res => {
				this.img = res.data.value
				this.isshow = true
			})

		},
		methods: {
			toback() {
				uni.navigateBack(1)
			},
			previewImage(e) {
				uni.previewImage({
					// 需要预览的图片链接列表
					urls: [],
					// 为当前显示图片的链接/索引值
					current: this.img,
					// 图片指示器样式	
					indicator: 'default',
					// 是否可循环预览
					loop: false,
					// 长按图片显示操作菜单，如不填默认为保存相册
					// longPressActions:{
					// 	itemList:[this.l('发送给朋友'),this.l]
					// },
					success: res => {
						console.log('res', res);
					},
					fail: err => {
						console.log('err', err);
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	/deep/.u-navbar__content__left.data-v-75dad532,
	.u-navbar__content__right.data-v-75dad532 {
		z-index: 20000;
	}
</style>
